package com.sfdk.graphics.core
{
import com.sfdk.pools.TextFormatPool;

import flash.text.AntiAliasType;
import flash.text.TextField;
import flash.text.TextFieldAutoSize;

/**
	 * Classe pour étendre certaines fonctions
	 **/
	public class TextFieldEx extends TextField
	{	
		
		public function TextFieldEx(styleId : String = "Arial-White-12", align : String = "left", selectable : Boolean = false)
		{
			super();
			this.text = "";
			
			this.defaultTextFormat = TextFormatPool.instance.getTextFormat(styleId);
			this.selectable = selectable;
            this.wordWrap = true;
            this.antiAliasType = AntiAliasType.NORMAL;
			this.thickness = -100;
			if (align == "left")
				this.autoSize = TextFieldAutoSize.LEFT;
			else if (align == "center")
				this.autoSize = TextFieldAutoSize.CENTER;
			else
				this.autoSize = TextFieldAutoSize.RIGHT;
            this.autoSize = TextFieldAutoSize.NONE;
				
			this.embedFonts = true;
		}
	}
}